package cn.pzhu.java.ch03.abstractclass;

abstract class Printer {
	String typeNo;
	public Printer(String typeNo) {
		super();
		this.typeNo = typeNo;
	}
	abstract void print(String content);
	void showTypeNo(){
		System.out.println(typeNo);
	}
}


class LaserPrinter extends Printer{
	LaserPrinter(String typeNo){
		super(typeNo);
	}
	void print(String content) {
		System.out.println(typeNo+" printing.......");
		System.out.println(content);
		
	}
	
}

class InkPrinter extends Printer implements IScanable{
	public InkPrinter(String typeNo) {
		super(typeNo);
	}
	void print(String content) {
		System.out.println(typeNo+" printing+++++++++++++++");
		System.out.println(content);
	}
	public String scan(String paper) {		
		return typeNo+" sanning.... Content:\n"+paper;
	}
	
}

